﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using TDT_Project.classes;
namespace TDT_Project
{
    public partial class Masterpages : System.Web.UI.MasterPage
    {
        cls_anh_nen cls = new cls_anh_nen();
        public string g_anhnen = "";
        public string g_anhnen1 = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                DataSet ds = cls.Load_AnhNen();
                if (ds != null && ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        g_anhnen = "<div style='background: url(" + "/images/Upload/anhnen/" + ds.Tables[0].Rows[0]["hinh_anh"].ToString() + ") top no-repeat'>";
                        g_anhnen1 = "</div>";
                    }
                    else
                    {
                        g_anhnen = "<div>";
                        g_anhnen1 = "</div>";
                    }
                }
                else
                {
                    g_anhnen = "<div>";
                    g_anhnen1 = "</div>";
                }
            }

        }

    }
}